gtk4.git
10 years agoentry: Compute selection range correctly
Benjamin Otte [Wed, 27 Jan 2016 01:07:35 +0000 (02:07 +0100)]
entry: Compute selection range correctly

gtk_editable_get_selection_bounds() returns UTF-8 character offsets,
but gdk_pango_layout_get_clip_region() wants byte ranges, so convert
from one to the other.
With English, this is especially visible for passwords, which use ●
as the invisible character.

https://bugzilla.gnome.org/show_bug.cgi?id=761128

10 years agowindow: Deprecate gtk_window_parse_geometry()
Benjamin Otte [Wed, 27 Jan 2016 00:09:51 +0000 (01:09 +0100)]
window: Deprecate gtk_window_parse_geometry()

Geometry handling in GTK is deprecated.

10 years agowindow: Deprecate gtk_window_set_default_geometry()
Benjamin Otte [Wed, 27 Jan 2016 00:07:01 +0000 (01:07 +0100)]
window: Deprecate gtk_window_set_default_geometry()

We don't support geometries anymore.

10 years agoAdd an XSetting for primary button warps slider
Olav Vitters [Mon, 25 Jan 2016 18:59:05 +0000 (19:59 +0100)]
Add an XSetting for primary button warps slider

This will be used by xsettings-kde to ensure GTK+3.x programs behave
consistently.

https://bugzilla.gnome.org/show_bug.cgi?id=688524

10 years agogdk: Don't translate signal names
Matthias Clasen [Tue, 26 Jan 2016 17:42:04 +0000 (12:42 -0500)]
gdk: Don't translate signal names

This was a thinko - what we sometimes do for signal names is to
use I_() to intern them (to avoid a strdup), but I_() is not
currently available in gdk, so lets just skip this
microoptimization for now.

10 years agospinbutton: Don't expand the buttons
Benjamin Otte [Tue, 26 Jan 2016 15:40:33 +0000 (16:40 +0100)]
spinbutton: Don't expand the buttons

When the spinbutton grows larger, distribute horizontal size to the
entry and vertical size to the buttons.

Obviously, horizontal size only matters for horizontal spinbuttons and
vertical for vertical spinbuttons.

10 years agostack: realize windows in correct position
Benjamin Otte [Tue, 26 Jan 2016 15:36:13 +0000 (16:36 +0100)]
stack: realize windows in correct position

10 years agopathbar: Use CSS node ordering
Benjamin Otte [Tue, 26 Jan 2016 13:13:18 +0000 (14:13 +0100)]
pathbar: Use CSS node ordering

Instead of the custom get_path_for_child() function.

10 years agostack: Turn into no-window widget
Benjamin Otte [Tue, 26 Jan 2016 13:02:55 +0000 (14:02 +0100)]
stack: Turn into no-window widget

Having priv->view_window be the same as widget->window does not make
sense.

And because we need to clip the content area, we need the view window.

10 years agoentry: Chain up in realize()
Benjamin Otte [Tue, 26 Jan 2016 12:23:44 +0000 (13:23 +0100)]
entry: Chain up in realize()

... instead of copy/pasting what gtk_widget_real_realize() does.

10 years agobuild: Missing build flags
Emmanuele Bassi [Tue, 26 Jan 2016 13:32:47 +0000 (13:32 +0000)]
build: Missing build flags

The compiler and linker flags variables were renamed in the previous
commit.

10 years agoAdd more checks for the font features demo
Emmanuele Bassi [Tue, 26 Jan 2016 13:29:46 +0000 (13:29 +0000)]
Add more checks for the font features demo

The demo also uses PangoFt2 API.

10 years agodemo: Link against Harfbuzz
Emmanuele Bassi [Tue, 26 Jan 2016 11:46:48 +0000 (11:46 +0000)]
demo: Link against Harfbuzz

The font features demo started calling the Harfbuzz API directly
starting from commit 9de3b24c205f1c647292a490f92f21a776b931a4. Harfbuzz
is an implicit dependency of Pango on some platforms, but it's not part
of the public dependencies; this means that we cannot expect to link to
Pango and automatically get Harfbuzz symbols to link against —
especially when things like --as-needed are in play.

This change triggered build failures on non-Unix platforms, fixed by
commit 2a9967731a3b77b102ada633c39b5a35efc80957, as well as build
failures in Continuous, with this error message:

/usr/lib/gcc/x86_64-gnomeostree-linux/4.9.3/../../../../x86_64-gnomeostree-linux/bin/ld:
font_features.o: undefined reference to symbol 'hb_tag_to_string'
//lib/libharfbuzz.so.0: error adding symbols: DSO missing from command
line
collect2: error: ld returned 1 exit status

In order to get the font features demo to build everywhere we should
take an explicit, though optional, check on Harfbuzz, and conditionally
build the font features demo with the right compiler and linker flags.

10 years agodemos: Don't build font features demo on non-UNIX
Chun-wei Fan [Tue, 26 Jan 2016 07:56:07 +0000 (15:56 +0800)]
demos: Don't build font features demo on non-UNIX

The fonts features demo now uses fontconfig APIs via PangoFT2, which makes
the code not build on non-Linux, so only include this demo in the build
on UNIX.

10 years agogtk-demo: Expand font features demo
Matthias Clasen [Mon, 25 Jan 2016 05:40:49 +0000 (00:40 -0500)]
gtk-demo: Expand font features demo

Add more features to the list, allow selecting script/language
from the set that is supported by the font, indicate which
features are present in the font for the selected script/language,
and expand the default specimen to cover latin, cyrillic and
greek.

10 years agoUpdate expected output of a11y tests
Matthias Clasen [Mon, 25 Jan 2016 20:59:32 +0000 (15:59 -0500)]
Update expected output of a11y tests

This is the outcome of a recent fix to default values
for a GtkPaned property.

10 years agoDocs: fix typo
Ben Iofel [Mon, 25 Jan 2016 20:34:08 +0000 (15:34 -0500)]
Docs: fix typo

10 years agowayland: __NR_memfd_create instead of SYS_memfd_create
Ray Strode [Mon, 25 Jan 2016 18:55:25 +0000 (13:55 -0500)]
wayland: __NR_memfd_create instead of SYS_memfd_create

It looks like the gnome-continuous headers haven't quite
caught up yet, so try __NR_memfd_create instead.

If that doesn't work, i'll likely just add in a fallback
code path.

10 years agowayland: use memfd_create instead of open in tmpdir
Ray Strode [Mon, 25 Jan 2016 16:41:23 +0000 (11:41 -0500)]
wayland: use memfd_create instead of open in tmpdir

The tmpdir is used for a wide assortment of things, and
can easily fill up. If it fills then desktop will start
crashing with SIGBUS errors.

This commit changes the shm pool allocation code, to use
memfd_create, instead, so the shared memory files will
be anonymous and not associated with /tmp

https://bugzilla.gnome.org/show_bug.cgi?id=761095

10 years agoFix another quoting error in installed tests
Matthias Clasen [Mon, 25 Jan 2016 18:01:15 +0000 (13:01 -0500)]
Fix another quoting error in installed tests

Same as the previous one. I should fix my silly mistakes before
copying them around...

10 years agotestsuite: Fix a quoting error
Matthias Clasen [Mon, 25 Jan 2016 15:56:19 +0000 (10:56 -0500)]
testsuite: Fix a quoting error

This was breaking continous testing. Oops.

10 years agospinbutton: Add a base gadget
Benjamin Otte [Mon, 25 Jan 2016 15:14:23 +0000 (16:14 +0100)]
spinbutton: Add a base gadget

This really messes up rendering in Adwaita because the code now renders
the spinbutton's entry node when it didn't before.

10 years agoentry: Use cleverer method to get the entry node
Benjamin Otte [Mon, 25 Jan 2016 14:47:40 +0000 (15:47 +0100)]
entry: Use cleverer method to get the entry node

10 years agoentry: Move spinbutton size hack
Benjamin Otte [Mon, 25 Jan 2016 14:42:18 +0000 (15:42 +0100)]
entry: Move spinbutton size hack

If we want to do special sizing for the text, we need to do it for the
text. Otherwise paddings, borders and entyr icons will screw up
everything.

10 years agoentry: Move code
Benjamin Otte [Mon, 25 Jan 2016 14:04:04 +0000 (15:04 +0100)]
entry: Move code

This movement is necessary for future gadgetization of GtkSpinButton.

10 years agoentry: Redo textarea handling
Benjamin Otte [Mon, 25 Jan 2016 00:33:28 +0000 (01:33 +0100)]
entry: Redo textarea handling

(1) Keep priv->text_allocation for the area used by the text
(2) Compute all text coordinates with the help of priv->text_allocation

As a side effect the get_text_area_size and get_frame_size vfuncs are
now unused. If we wanted them back, they should get a single use durig
size_allocate() and then their results should be stored for further
processing.

10 years agoentry: Use gtk_render_layout()
Benjamin Otte [Sun, 24 Jan 2016 23:07:23 +0000 (00:07 +0100)]
entry: Use gtk_render_layout()

It's funny that nobody has yet noticed that we don't draw the text using
the theme.

We had no text-shadow in entries!!!!!

10 years agoentry: Draw selection the same way as GtkLabel
Benjamin Otte [Sun, 24 Jan 2016 23:00:41 +0000 (00:00 +0100)]
entry: Draw selection the same way as GtkLabel

10 years agoentry: Fold function into only caller
Benjamin Otte [Sun, 24 Jan 2016 22:52:49 +0000 (23:52 +0100)]
entry: Fold function into only caller

10 years agoentry: Don't allow different text over progress
Benjamin Otte [Sun, 24 Jan 2016 22:46:12 +0000 (23:46 +0100)]
entry: Don't allow different text over progress

This complicates refactorings, so remove that feature. It's not used
anywhere and doesn't play well with nodes the way it's implemented.
If we want it back, we can add it back later.

10 years agoUpdated POTFILES.skip
Piotr Drąg [Mon, 25 Jan 2016 02:07:00 +0000 (03:07 +0100)]
Updated POTFILES.skip

10 years agoOne forgotten rename
Matthias Clasen [Mon, 25 Jan 2016 01:10:45 +0000 (20:10 -0500)]
One forgotten rename

Rename app-menu.ui to menus.ui in EXTRA_DIST too.

10 years agoicon browser: Load app menu automagically
Matthias Clasen [Mon, 25 Jan 2016 01:01:33 +0000 (20:01 -0500)]
icon browser: Load app menu automagically

No need to manually create a builder and pass the resource to it,
just follow the conventions and have GtkApplication do it for us.

10 years agopath bar: Don't hide arrows
Matthias Clasen [Sun, 24 Jan 2016 21:29:40 +0000 (16:29 -0500)]
path bar: Don't hide arrows

Changing the visibility of child widgets in size-allocate does
not work well with out current allocation and layout machinery.
To avoid the visual fallout, just keep the arrow buttons visible
and only change their sensitivity.

https://bugzilla.gnome.org/show_bug.cgi?id=754868

10 years agoinspector: Show CSS pseudoclass names for node state
Matthias Clasen [Sun, 24 Jan 2016 15:58:32 +0000 (10:58 -0500)]
inspector: Show CSS pseudoclass names for node state

This is a better fit for showing CSS node state, since one
commonly looks at this information to devise CSS selectors,
where the CSS names are needed.

10 years agocss: Privately export a function to get pseudoclass names
Matthias Clasen [Sun, 24 Jan 2016 15:56:23 +0000 (10:56 -0500)]
css: Privately export a function to get pseudoclass names

This function centralizes the mapping for widget states
to pseudoclass names in one place, for easier maintenance.

10 years agogdkdnd: Fix signal docs
Timm Bäder [Sun, 24 Jan 2016 09:48:48 +0000 (10:48 +0100)]
gdkdnd: Fix signal docs

Signals all have at least one parameter, the object that received the
signal.

10 years agoInspector: Plug a few leaks
Timm Bäder [Sun, 24 Jan 2016 07:01:36 +0000 (08:01 +0100)]
Inspector: Plug a few leaks

10 years agopaned: Initialize max_position
Matthias Clasen [Sun, 24 Jan 2016 05:22:31 +0000 (00:22 -0500)]
paned: Initialize max_position

As pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=608865
max_position should be set to G_MAXINT.

10 years agowidget-factory: Add a color editor example
Matthias Clasen [Sun, 24 Jan 2016 03:30:59 +0000 (22:30 -0500)]
widget-factory: Add a color editor example

10 years agocolor editor: Ensure spin buttons are wide enough
Matthias Clasen [Sat, 23 Jan 2016 23:26:09 +0000 (18:26 -0500)]
color editor: Ensure spin buttons are wide enough

If we don't explicitly ask for 2 chars to be visible, we might
get less, and it doesn't look great.

10 years agoGtkColorChooser: make set_rgba work in editor mode
Sebastien Lafargue [Fri, 22 Jan 2016 21:25:29 +0000 (22:25 +0100)]
GtkColorChooser: make set_rgba work in editor mode

When using the color chooser in editor mode,
gtk_color_chooser_set_rgba need to be propaged
to the editor

https://bugzilla.gnome.org/show_bug.cgi?id=761005

10 years agoAdd a color editor test
Matthias Clasen [Sat, 23 Jan 2016 23:00:57 +0000 (18:00 -0500)]
Add a color editor test

This tests using a color editor embedded in other ui.

10 years agowidget-factory: Ensure spinbuttons are sized right
Matthias Clasen [Sat, 23 Jan 2016 20:52:09 +0000 (15:52 -0500)]
widget-factory: Ensure spinbuttons are sized right

GtkEntry now respects the padding set by the theme, so we
need to ask the spin buttons to show 2 characters, otherwise
they will be clipped.

10 years agocontainer: Clarify the forall/foreach documentation
Matthias Clasen [Sat, 23 Jan 2016 06:51:48 +0000 (01:51 -0500)]
container: Clarify the forall/foreach documentation

Try to make the difference between these two functions
clearer.

10 years agoAdd missing (out) annotation to gdk_rgba_parse
Phil Clayton [Sun, 13 Sep 2015 10:58:37 +0000 (11:58 +0100)]
Add missing (out) annotation to gdk_rgba_parse

https://bugzilla.gnome.org/show_bug.cgi?id=754990

10 years agoUpdated German translation
Mario Blättermann [Sat, 23 Jan 2016 17:21:45 +0000 (18:21 +0100)]
Updated German translation

10 years agowin32 geometry: reorganize code to avoid prototypes
Ignacio Casal Quinteiro [Sat, 23 Jan 2016 22:35:59 +0000 (14:35 -0800)]
win32 geometry: reorganize code to avoid prototypes

10 years agowin32 device manager: reorganize code to avoid prototypes
Ignacio Casal Quinteiro [Sat, 23 Jan 2016 22:32:32 +0000 (14:32 -0800)]
win32 device manager: reorganize code to avoid prototypes

10 years agowin32 virtual device: reorganize code to avoid prototypes
Ignacio Casal Quinteiro [Sat, 23 Jan 2016 22:27:02 +0000 (14:27 -0800)]
win32 virtual device: reorganize code to avoid prototypes

10 years agowin32 device: reorganize code to avoid prototypes
Ignacio Casal Quinteiro [Sat, 23 Jan 2016 22:26:04 +0000 (14:26 -0800)]
win32 device: reorganize code to avoid prototypes

10 years agowintab: reorganize code to avoid prototypes
Ignacio Casal Quinteiro [Sat, 23 Jan 2016 22:24:39 +0000 (14:24 -0800)]
wintab: reorganize code to avoid prototypes

10 years agooverlay: Don't access priv pointer before typ check
Timm Bäder [Sat, 23 Jan 2016 09:30:53 +0000 (10:30 +0100)]
overlay: Don't access priv pointer before typ check

10 years agolevelbar: Document CSS node ordering
Matthias Clasen [Sat, 23 Jan 2016 04:30:36 +0000 (23:30 -0500)]
levelbar: Document CSS node ordering

10 years agonotebook: Document CSS node order
Matthias Clasen [Sat, 23 Jan 2016 04:14:09 +0000 (23:14 -0500)]
notebook: Document CSS node order

10 years agobox gadget: Don't allow shifting too far
Matthias Clasen [Sat, 23 Jan 2016 03:49:01 +0000 (22:49 -0500)]
box gadget: Don't allow shifting too far

We don't want to let baseline adjustment shift the child
out of the original allocation. This is purely a sanity
measure - in practice, the baseline should always be bigger
than the child_baseline.

10 years agobox gadget: Fix baseline calculation
Matthias Clasen [Sat, 23 Jan 2016 03:47:47 +0000 (22:47 -0500)]
box gadget: Fix baseline calculation

Careful comparison with GtkBox revealed that the box gadget
code was confusing up and down, and thus shifted baselines
vertically.

10 years agoinspector: Show baseline value
Matthias Clasen [Sat, 23 Jan 2016 03:24:46 +0000 (22:24 -0500)]
inspector: Show baseline value

The misc info page already shows the allocation and clip areas,
the baseline fits right in.

10 years agobox gadget: Fix baseline allocation for widgets
Matthias Clasen [Sat, 23 Jan 2016 03:08:38 +0000 (22:08 -0500)]
box gadget: Fix baseline allocation for widgets

We were adjusting the allocation to line up baselines before
calling gtk_widget_size_allocate_with_baseline, but that function
is doing this alignment internally anyway and expects to be given
a 'fill' allocation.

Move the allocation adjustment code down into
gtk_box_gadget_allocate_child where it only affects child gadgets,
not child widgets.

10 years agogadget: Add baseline debugging
Matthias Clasen [Sat, 23 Jan 2016 02:34:54 +0000 (21:34 -0500)]
gadget: Add baseline debugging

This should help to understand whats going wrong with
baselines.

10 years agoAdwaita: Move .ssd class around
Matthias Clasen [Sat, 23 Jan 2016 00:23:54 +0000 (19:23 -0500)]
Adwaita: Move .ssd class around

Make the theme follow our documentation for the various .csd and
.ssd style classes: They all go on the window node. For now, just
add the new selector; the old one will be removed when mutter has
been updated.

https://bugzilla.gnome.org/show_bug.cgi?id=760714

10 years agobox gadget: Fix height-for-width handling
Matthias Clasen [Fri, 22 Jan 2016 22:10:41 +0000 (17:10 -0500)]
box gadget: Fix height-for-width handling

When measuring children while distributing a given height,
we must measure them for the given width that goes with
the height. Otherwise, things will go wrong if some of the
children do actual width-for-height. This was showing up
as misaligned images in anaconda.

https://bugzilla.gnome.org/show_bug.cgi?id=760967

10 years agoGtkTreeView: Update prelight row after revalidating rows
Carlos Garnacho [Thu, 21 Jan 2016 14:22:42 +0000 (15:22 +0100)]
GtkTreeView: Update prelight row after revalidating rows

It might have changed (eg. after a row being expanded, and the child
rows revalidated), so just update it here based on the last pointer
position.

Based on a patch by Maxim Reznik <reznikmm@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=760891

10 years agoGtkTreeView: Avoid device query on collapsing rows
Carlos Garnacho [Thu, 21 Jan 2016 14:21:16 +0000 (15:21 +0100)]
GtkTreeView: Avoid device query on collapsing rows

The pointer position is queried to properly trigger the prelight
updates on the new row below it. We store the last coordinates
though, and track crossing events to unset these, so it's safe
to just update_prelight() here on these.

10 years agoshortcuts: Don't forall() widgets that aren't children
Benjamin Otte [Fri, 22 Jan 2016 19:39:14 +0000 (20:39 +0100)]
shortcuts: Don't forall() widgets that aren't children

10 years agowidget: Improve gtk_cairo_should_draw_window()
Benjamin Otte [Thu, 21 Jan 2016 15:53:25 +0000 (16:53 +0100)]
widget: Improve gtk_cairo_should_draw_window()

Check that non-native window are indeed children of the event window and
only then confirm that they should be drawn.

Fixes Glade thinking that it's okay to have the draw function do
different things depending on what window to draw. (This should really
be fixed in Glade.)

10 years agocssstyleproperty: Don't allow assigning min-width/min-height
Benjamin Otte [Thu, 21 Jan 2016 12:31:14 +0000 (13:31 +0100)]
cssstyleproperty: Don't allow assigning min-width/min-height

10 years agocontainer: Turn assert into return_if_fail()
Benjamin Otte [Thu, 21 Jan 2016 01:19:04 +0000 (02:19 +0100)]
container: Turn assert into return_if_fail()

There's no reason to insta-crash when something goes wrong. Just don't
do anything stupid.

Also, remove the SPCIAL_CONTAINER() exception. Every case where special
containers needed this, it is wrong and made containers draw children
multiple times.

10 years agostack: Clip animation drawing
Benjamin Otte [Thu, 21 Jan 2016 00:44:47 +0000 (01:44 +0100)]
stack: Clip animation drawing

We use cairo_paint() when doing that and we don't want to overdraw the
content area.

10 years agospinbutton: Make the entry gadget be the entry's gadget
Benjamin Otte [Thu, 21 Jan 2016 00:22:41 +0000 (01:22 +0100)]
spinbutton: Make the entry gadget be the entry's gadget

This is a big and somewhat evil hack: We replace the entry's gadget's
node with the spinbutton's entry node.

10 years agoAdwaita: fix checks and radios on selected row
Lapo Calamandrei [Fri, 22 Jan 2016 12:29:35 +0000 (13:29 +0100)]
Adwaita: fix checks and radios on selected row

10 years agotext view: Don't leak cairo transforms
Matthias Clasen [Fri, 22 Jan 2016 04:39:16 +0000 (23:39 -0500)]
text view: Don't leak cairo transforms

The text view draw function was leaving its cairo context
with a transformation after drawing to all the border windows,
which lead mis-drawing in gitg. Avoid this by moving the
gtk_cairo_transform_to_window call inside the existing
cairo_save/restore calls.

https://bugzilla.gnome.org/show_bug.cgi?id=760942

10 years agowayland: Don't hardcode /tmp
Matthias Clasen [Fri, 22 Jan 2016 03:53:06 +0000 (22:53 -0500)]
wayland: Don't hardcode /tmp

As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=760964,
we should use the GLib facilities for determining the preferred
location for temporary files.

10 years agoUpdated German translation
Mario Blättermann [Thu, 21 Jan 2016 16:48:25 +0000 (17:48 +0100)]
Updated German translation

10 years agocssstyleproperty: Make it possible to query CSS opacity with gtk_style_context_get()
Carlos Garcia Campos [Thu, 21 Jan 2016 13:36:42 +0000 (14:36 +0100)]
cssstyleproperty: Make it possible to query CSS opacity with gtk_style_context_get()

Add a query implementation to opacity property. Also fix the assert in
gtk_css_style_property_register() to allow registering properties with
query but without assign function.

https://bugzilla.gnome.org/show_bug.cgi?id=760933

10 years agoAdwaita: first css check/radio implementation
Lapo Calamandrei [Thu, 21 Jan 2016 02:12:10 +0000 (03:12 +0100)]
Adwaita: first css check/radio implementation

draw checks and radios with css istead of relying on png assets.

10 years agocss: Fix refcounting thinko in -gtk-recolor
Matthias Clasen [Thu, 21 Jan 2016 13:42:55 +0000 (08:42 -0500)]
css: Fix refcounting thinko in -gtk-recolor

gtk_css_style_get_value does not return a reference.
So don't unref the return value without taking one.

10 years agoHandle svg image assets in Adwaita
Matthias Clasen [Thu, 21 Jan 2016 13:20:06 +0000 (08:20 -0500)]
Handle svg image assets in Adwaita

The build glue for collecting all the assets in Adwaita as
resources was assuming that they are all pngs, and tried to
preprocess them into embedded GdkPixbufs.
Fix it to leave svgs unmolested, so they can be recolored
at runtime.

10 years agocss: Handle image loading errors graciously
Matthias Clasen [Thu, 21 Jan 2016 13:18:46 +0000 (08:18 -0500)]
css: Handle image loading errors graciously

If we fail to load the image for a -gtk-recolor() expression,
fall back to using the image-missing icon instead of crashing,
and include more details in the warning message.

10 years agoForgotten file
Matthias Clasen [Thu, 21 Jan 2016 13:18:28 +0000 (08:18 -0500)]
Forgotten file

10 years agoAdwaita: Set a text color for lists
Matthias Clasen [Thu, 21 Jan 2016 03:53:47 +0000 (22:53 -0500)]
Adwaita: Set a text color for lists

Symbolic icons in list boxes came out white-on-white in the
inspector. Set an explicit text color to prevent that.

10 years agoinspector: Show full allocation + clip
Matthias Clasen [Thu, 21 Jan 2016 03:52:05 +0000 (22:52 -0500)]
inspector: Show full allocation + clip

Previously, we were only showing the size of the allocation
and clip area. But there is no good reason to hide the position
of these rectangles, so add them, in the traditional format
of X geometry strings: wxh+x+y

10 years agoinspector: Refine typography
Matthias Clasen [Thu, 21 Jan 2016 03:51:25 +0000 (22:51 -0500)]
inspector: Refine typography

Use thin spaces in the formatting of monitor sizes.

10 years agoFix GtkShortcutsWindow crash
Matthias Clasen [Thu, 21 Jan 2016 00:33:16 +0000 (19:33 -0500)]
Fix GtkShortcutsWindow crash

GtkShortcutsWindow is among the 'cheating' containers that iterate
over indirect children in forall, and this is now triggering
an assertion in gtk_container_propagate_draw.

For now, just exclude the cheating containers from the assertion.
Eventually, this needs a better solution.

10 years agowayland: don't pass in width and height to create_shm_pool
Ray Strode [Wed, 20 Jan 2016 17:35:44 +0000 (12:35 -0500)]
wayland: don't pass in width and height to create_shm_pool

create_shm_pool doesn't need the width or height, it just needs
the total size.  By passing it in, we're requiring it to redo
stride calculation unnecessarily.

This commit drops the width and height parameters and makes the
function just take the total size directly.

https://bugzilla.gnome.org/show_bug.cgi?id=760897

10 years agowayland: clean up stride calculation when creating shm surface
Ray Strode [Wed, 20 Jan 2016 16:40:34 +0000 (11:40 -0500)]
wayland: clean up stride calculation when creating shm surface

Right now, we assume the stride for the image surface needs to
be 4 byte aligned.  This is, in fact, true, but it's better to
ask cairo for the alignment requirement directly rather than
assume we know the alignment rules.

This commit changes the code to use cairo_format_stride_for_width
to calculate a suitable rowstride for pixman.

https://bugzilla.gnome.org/show_bug.cgi?id=760897

10 years agowayland: unlink shm file earlier in create function
Ray Strode [Wed, 20 Jan 2016 17:22:29 +0000 (12:22 -0500)]
wayland: unlink shm file earlier in create function

create_shm_pool unlinks the temporary file a little,
too late. It should be unlinked before ftruncate()
is called for two reasons:

1) if ftruncate fails, the file is currently not
getting cleaned up at all
2) in theory, if the file is public some other process
could muck with it

This commit just moves the unlink call a little higher
up.

https://bugzilla.gnome.org/show_bug.cgi?id=760897

10 years agoGtkNotebook: Unify two private variables
Carlos Garnacho [Wed, 20 Jan 2016 18:52:01 +0000 (19:52 +0100)]
GtkNotebook: Unify two private variables

Button state was being kept in two separate variables, which lead
to slight confusions in DnD that caused the notebook to ignore the
first click after DnD happened from (within) it. Unify these two
into one, which helps us keep better track of the really pressed
buttons.

10 years agocontainer: Don't create too-large clips
Matthias Clasen [Wed, 20 Jan 2016 18:42:45 +0000 (13:42 -0500)]
container: Don't create too-large clips

gdk_rectangle_union will happily add all the worlds pixels
to the union if the initial rectangle is initialized to all
zeros. Therefore, explicitly check for an empty rectangle
before calling it.

10 years agoClarify docs for gdk_rectangle_union
Matthias Clasen [Wed, 20 Jan 2016 18:12:13 +0000 (13:12 -0500)]
Clarify docs for gdk_rectangle_union

This function does not ignore empty rectangles. Since this
is a fairly subtle point about the behavior, it is worth
spelling this out in the documentation. We've had a bug
open about this for a long time:

https://bugzilla.gnome.org/show_bug.cgi?id=464528

10 years agowayland: Protect against NULL offers on gdk_drag_status() implementation
Carlos Garnacho [Wed, 20 Jan 2016 17:55:51 +0000 (18:55 +0100)]
wayland: Protect against NULL offers on gdk_drag_status() implementation

If we're called untimely, we might end up crashing here when poking the
NULL wl_data_offer.

10 years agogtkdnd: Disconnect GdkDragContext signals on gtk_drag_source_info_free()
Carlos Garnacho [Wed, 20 Jan 2016 17:53:03 +0000 (18:53 +0100)]
gtkdnd: Disconnect GdkDragContext signals on gtk_drag_source_info_free()

Otherwise it may still be tricked into emitting further signals at a
time we've already destroyed the GtkDragSourceInfo passed as callback
user data.

10 years agonotebook: Get rid of during_reorder variable
Benjamin Otte [Wed, 20 Jan 2016 16:37:04 +0000 (17:37 +0100)]
notebook: Get rid of during_reorder variable

Use operation == OPERATION_REORDER instead.

10 years agonotebook: Properly hide drag window
Benjamin Otte [Wed, 20 Jan 2016 16:20:03 +0000 (17:20 +0100)]
notebook: Properly hide drag window

Move code to properly reinsert the tab label to where it belongs.
The if has the distinction between reparented-to-dnd-window and
just-changed-the-gdk-window-to-draw-to right there.

https://bugzilla.gnome.org/show_bug.cgi?id=760754

10 years agonotebook: Get rid of during_detach member
Benjamin Otte [Wed, 20 Jan 2016 15:45:40 +0000 (16:45 +0100)]
notebook: Get rid of during_detach member

use operation == OPERATION_DETACH instead.

10 years agoAdd a function to get affected area for background
Matthias Clasen [Wed, 20 Jan 2016 14:41:01 +0000 (09:41 -0500)]
Add a function to get affected area for background

The new function, gtk_render_background_get_clip answers the
question: what pixels are affected if I call gtk_render_background ?

The long-term goal is to have APIs that answer this question for
all rendering primitives.

10 years agofile chooser: Allow saving even if executable attribute is not set
Ondrej Holy [Wed, 20 Jan 2016 10:36:12 +0000 (11:36 +0100)]
file chooser: Allow saving even if executable attribute is not set

Commit 8e975b2 (Bug 753969) introduced check of parent accessibility.
Consequently it is not possible to save file if executable attribute
is not set, which might happen for some gvfs backends. Let's assume
that the folder is accessible even if the attribute is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=760881

10 years agoconfigure: Require wayland >= 1.9.91
Kalev Lember [Wed, 20 Jan 2016 12:00:10 +0000 (13:00 +0100)]
configure: Require wayland >= 1.9.91

Needed since commit 1045dda0358dee67e8dfbf13b40181b4c2ba1f1c

10 years agoviewport: Don't destroy pixelcache while it's still used
Benjamin Otte [Wed, 20 Jan 2016 04:09:25 +0000 (05:09 +0100)]
viewport: Don't destroy pixelcache while it's still used

Removing the child unsets the pxielcache's style context...

10 years agogtk-demo: Fix font features sources
Matthias Clasen [Wed, 20 Jan 2016 03:45:37 +0000 (22:45 -0500)]
gtk-demo: Fix font features sources

The resources had the prefix, causing the ui file not
to show up.